<div id="score-good-view">
  <div class="page">
    <div class="al-list-container">
      <form class="form-horizontal al-search-container" role="form">
        <div class="form-group">
          <label class="col-sm-2 control-label">状态</label>
          <div class="col-sm-2">
            <select ng-model="search.enabled" class="form-control"
                    ng-options="option.value as option.name for option in qgyGoodStatusList"></select>
          </div>
          <div class="col-sm-4">
            <input class="form-control" type="text" placeholder="商品名称"
                   ng-model="search.filter" maxlength="32">
          </div>
          <div class="col-sm-1 ">
            <button type="button" ng-click="queryData()" class="btn btn-success al-float-right">查询</button>
          </div>
          <div class="col-sm-1">
            <button type="button" ng-click="resetSearch()" class="btn btn-default">重置</button>
          </div>
          <div class="col-sm-1 col-sm-offset-1">
            <button type="button" ng-click="newData()" class="btn btn-primary">新建</button>
          </div>
        </div>
      </form>
      <table ng-table="tableParams"
             class="table  table-bordered table-striped table-condensed al-table-container">
        <thead>
        <tr>
          <td>序号</td>
          <td>上线城市</td>
          <td>商品名称</td>
          <td>所需积分</td>
          <td>图片</td>
          <td>描述</td>
          <td>状态</td>
          <td>操作</td>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="item in $data">
          <td>{{$index+1}}</td>
          <td>{{item.city|constantTransfer:cityList}}</td>
          <td>{{item.title}}</td>
          <td>{{item.score}}</td>
          <td><img ng-if="item.thumb" ng-src="{{item.thumb}}" width="80px" height="80px"/></td>
          <td>{{item.description}}</td>
          <td>{{item.enabled|constantTransfer:qgyGoodStatusList}}</td>
          <td>
            <button class="btn btn-warning btn-sm" ng-click="editData(item)">编辑</button>
          </td>
        </tr>
        </tbody>
      </table>
    </div>
  </div>
</div>
